package com.example.mylibrary.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.example.mylibrary.data.ByteImg;
import com.example.mylibrary.data.Item;
import com.example.mylibrary.data.ItemGrop;
import com.example.mylibrary.data.ItemRollCall;
import com.example.mylibrary.data.Schedule;
import com.example.mylibrary.data.Sort;
import com.example.mylibrary.data.StudentInfo;
import com.example.mylibrary.data.StudentItem;
import com.example.mylibrary.data.StudentItemGrop;
import com.example.mylibrary.data.StudentRollCall;

import com.example.mylibrary.greendao.ByteImgDao;
import com.example.mylibrary.greendao.ItemDao;
import com.example.mylibrary.greendao.ItemGropDao;
import com.example.mylibrary.greendao.ItemRollCallDao;
import com.example.mylibrary.greendao.ScheduleDao;
import com.example.mylibrary.greendao.SortDao;
import com.example.mylibrary.greendao.StudentInfoDao;
import com.example.mylibrary.greendao.StudentItemDao;
import com.example.mylibrary.greendao.StudentItemGropDao;
import com.example.mylibrary.greendao.StudentRollCallDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig byteImgDaoConfig;
    private final DaoConfig itemDaoConfig;
    private final DaoConfig itemGropDaoConfig;
    private final DaoConfig itemRollCallDaoConfig;
    private final DaoConfig scheduleDaoConfig;
    private final DaoConfig sortDaoConfig;
    private final DaoConfig studentInfoDaoConfig;
    private final DaoConfig studentItemDaoConfig;
    private final DaoConfig studentItemGropDaoConfig;
    private final DaoConfig studentRollCallDaoConfig;

    private final ByteImgDao byteImgDao;
    private final ItemDao itemDao;
    private final ItemGropDao itemGropDao;
    private final ItemRollCallDao itemRollCallDao;
    private final ScheduleDao scheduleDao;
    private final SortDao sortDao;
    private final StudentInfoDao studentInfoDao;
    private final StudentItemDao studentItemDao;
    private final StudentItemGropDao studentItemGropDao;
    private final StudentRollCallDao studentRollCallDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        byteImgDaoConfig = daoConfigMap.get(ByteImgDao.class).clone();
        byteImgDaoConfig.initIdentityScope(type);

        itemDaoConfig = daoConfigMap.get(ItemDao.class).clone();
        itemDaoConfig.initIdentityScope(type);

        itemGropDaoConfig = daoConfigMap.get(ItemGropDao.class).clone();
        itemGropDaoConfig.initIdentityScope(type);

        itemRollCallDaoConfig = daoConfigMap.get(ItemRollCallDao.class).clone();
        itemRollCallDaoConfig.initIdentityScope(type);

        scheduleDaoConfig = daoConfigMap.get(ScheduleDao.class).clone();
        scheduleDaoConfig.initIdentityScope(type);

        sortDaoConfig = daoConfigMap.get(SortDao.class).clone();
        sortDaoConfig.initIdentityScope(type);

        studentInfoDaoConfig = daoConfigMap.get(StudentInfoDao.class).clone();
        studentInfoDaoConfig.initIdentityScope(type);

        studentItemDaoConfig = daoConfigMap.get(StudentItemDao.class).clone();
        studentItemDaoConfig.initIdentityScope(type);

        studentItemGropDaoConfig = daoConfigMap.get(StudentItemGropDao.class).clone();
        studentItemGropDaoConfig.initIdentityScope(type);

        studentRollCallDaoConfig = daoConfigMap.get(StudentRollCallDao.class).clone();
        studentRollCallDaoConfig.initIdentityScope(type);

        byteImgDao = new ByteImgDao(byteImgDaoConfig, this);
        itemDao = new ItemDao(itemDaoConfig, this);
        itemGropDao = new ItemGropDao(itemGropDaoConfig, this);
        itemRollCallDao = new ItemRollCallDao(itemRollCallDaoConfig, this);
        scheduleDao = new ScheduleDao(scheduleDaoConfig, this);
        sortDao = new SortDao(sortDaoConfig, this);
        studentInfoDao = new StudentInfoDao(studentInfoDaoConfig, this);
        studentItemDao = new StudentItemDao(studentItemDaoConfig, this);
        studentItemGropDao = new StudentItemGropDao(studentItemGropDaoConfig, this);
        studentRollCallDao = new StudentRollCallDao(studentRollCallDaoConfig, this);

        registerDao(ByteImg.class, byteImgDao);
        registerDao(Item.class, itemDao);
        registerDao(ItemGrop.class, itemGropDao);
        registerDao(ItemRollCall.class, itemRollCallDao);
        registerDao(Schedule.class, scheduleDao);
        registerDao(Sort.class, sortDao);
        registerDao(StudentInfo.class, studentInfoDao);
        registerDao(StudentItem.class, studentItemDao);
        registerDao(StudentItemGrop.class, studentItemGropDao);
        registerDao(StudentRollCall.class, studentRollCallDao);
    }
    
    public void clear() {
        byteImgDaoConfig.clearIdentityScope();
        itemDaoConfig.clearIdentityScope();
        itemGropDaoConfig.clearIdentityScope();
        itemRollCallDaoConfig.clearIdentityScope();
        scheduleDaoConfig.clearIdentityScope();
        sortDaoConfig.clearIdentityScope();
        studentInfoDaoConfig.clearIdentityScope();
        studentItemDaoConfig.clearIdentityScope();
        studentItemGropDaoConfig.clearIdentityScope();
        studentRollCallDaoConfig.clearIdentityScope();
    }

    public ByteImgDao getByteImgDao() {
        return byteImgDao;
    }

    public ItemDao getItemDao() {
        return itemDao;
    }

    public ItemGropDao getItemGropDao() {
        return itemGropDao;
    }

    public ItemRollCallDao getItemRollCallDao() {
        return itemRollCallDao;
    }

    public ScheduleDao getScheduleDao() {
        return scheduleDao;
    }

    public SortDao getSortDao() {
        return sortDao;
    }

    public StudentInfoDao getStudentInfoDao() {
        return studentInfoDao;
    }

    public StudentItemDao getStudentItemDao() {
        return studentItemDao;
    }

    public StudentItemGropDao getStudentItemGropDao() {
        return studentItemGropDao;
    }

    public StudentRollCallDao getStudentRollCallDao() {
        return studentRollCallDao;
    }

}
